Repository navigation
test: raise line coverage - #58
Merged
Merged
Conversation
…d cover the listener errors On PHP 8.5 the Unit report marked lines of the listeners and the provider as unexecuted that the database suites never report, so Codecov counted them as missed. Assisted-By: Claude Opus 5.5 <[email protected]>
…umentless listeners Assisted-By: Claude Opus 5.5 <[email protected]>
…-inheritance entity Assisted-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 1.x #58 +/- ##
===========================================
+ Coverage 83.29% 97.83% +14.54%
===========================================
Files 20 20
Lines 443 416 -27
===========================================
+ Hits 369 407 +38
+ Misses 74 9 -65
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
ListenerProviderresolves them and the dispatcher runs them on a realOnCreate; the provider returns nothing for an unknown role or an event without listeners.getEventsList()method and a#[Listen]without its event raise errors.RegistryModifierreuses an existing field of the same type and rejects one of another type;OptimisticLockrejects an unknown rule; aBaseModifierwith no listener arguments declares the bare class.Why?
Line coverage: local Unit + SQLite 89.5% → 97.8%; Codecov on
1.x83.3% (82.7% on the repository page, which still reads the stalemasterbranch). Part of the Codecov gap is not missing tests: CI collects coverage with pcov on PHP 8.5+, where a file that a suite never loads is reported with its executable lines from static analysis, and those lines (constructor signatures, inner lines of multi-line calls) differ from what pcov reports for executed code. Codecov merges the flags, so such lines counted as missed whenever the Unit suite never loaded the class. The Unit tests above load the listeners and the provider.Review notes
Codecov (merged flags): 83.29% → 97.83% (74 → 9 missed lines, the 9 are
isType()).Bug, left in
src:EventDrivenCommandGenerator::generateParentStoreCommand()always dispatchesOnCreatefor the parent roles, also on update. Updating a joined-table-inheritance child therefore rewrites the parent'screatedAt(seen asUPDATE documents SET … created_at = <now>), andOnUpdatelisteners of the parent never run. The new test does not assertcreated_aton update for that reason.Suspected bug: the
OptimisticLockattribute documents and exposesRULE_MANUAL, butrender()throwsWrong rule \manual`` for it.Unreachable: the deprecated protected
RegistryModifier::isType()(9 lines) has no caller;RegistryModifieris@internal.With pcov on PHP 8.5 in docker, Unit + SQLite merged the way Codecov does: 406/477 → 444/453; only
isType()stays uncovered.Checklist